package com.situ.day6;

public class Rectangle {

	private int width;
	private int height;

	public Rectangle() {
		this.width = 1;
		this.height = 1;
	}

	public Rectangle(int width) {
		this.width = width;
		this.height = width;
	}

	public Rectangle(int width, int height) {
		this.width = width;
		this.height = height;
	}

	public int area() {
		return width * height;
	}

	public int perimeter() {
		return (width + height) * 2;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", height=" + height + "]";
	}

}
